﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FieldHost{
    public class Decision {

        public Decision() {
			//constructor
        }

		/// <summary>
		/// Is the decision submitted? Should we process this team decision?
		/// Should be a boolean
		/// </summary>
		public MetaField<int> InputFlag {
			get;
			set;
		}

		private readonly List<MetaField<int>> _hire = new List<MetaField<int>>();

		/// <summary>
		/// Returns a readonly list of Hired personnal (must take in count experienced and trainees).
		/// </summary>
		public List<MetaField<int>> Hire {
			get {
				return _hire;
			}
		}

		private readonly List<int> _fire = new List<int>();

		/// <summary>
		/// Fired Personnal (must take in count experienced and trainees)
		/// </summary>
		public List<int> Fire {
			get {
				return _fire;
			}
		}

		private readonly SpecializedCollection<int, MetaField<int>> _regionReps = new SpecializedCollection<int, MetaField<int>>();

		/// <summary>
		/// Regional Reps
		/// </summary>
		public IList<MetaField<int>> RegionReps {
			get {
				return _regionReps.GetRawList();
			}
		}

		//TODO: price(LOW_REG To HIGH_REG, LOW_CUST To HIGH_CUST) As Integer      
		//price per region (am, eu)  and per customer type (wholesaler, manufacturer)

		private readonly List<int> _rads = new List<int>();

		/// <summary>
		/// Region Advertisking
		/// </summary>
		public List<int> Rads {
			get {
				return _rads;
			}
		}

		//TODO: cPrty(LOW_REG To HIGH_REG, 1 To NUM_INDCUST) As Integer  'Customer Priority   
		//customer priority, number of customers per region [w1, w2.. m1, m2]
		
		private readonly List<int> _keyAccounts = new List<int>();

		/// <summary>
		/// Number of target key accounts
		/// </summary>
		public List<int> KeyAccounts {
			get {
				return _keyAccounts;
			}
		}
		
		private readonly List<int> _regionPriority = new List<int>();

		/// <summary>
		/// Region priority
		/// </summary>
		public List<int> RegionPriority {
			get {
				return _regionPriority;
			}
		}

		/// <summary>
		/// Short Term Issue //debt/loan
		/// </summary>
		public int StIssue {
			get;
			set;
		}

		/// <summary>
		/// Short Term Retire //debt/loan
		/// </summary>
		public int StRetire {
			get;
			set;
		}

		//long term debt/loan
		private readonly LongTermDebt _ltDebt = new LongTermDebt();

		/// <summary>
		/// Issue/Retire LT Debut
		/// </summary>
		public LongTermDebt LtDebt {
			get {
				return _ltDebt;
			}
		}

		/// <summary>
		/// Schedule for a future period
		/// </summary>
		public int LtSchedule {
			get;
			set;
		}

		private readonly PlantDecision _plant = new PlantDecision();

		public PlantDecision Plant {
			get {
				return _plant;
			}
		}

		/// <summary>
		/// Finished goods we want to purchase
		/// </summary>
		public int Purchase {
			get;
			set;
		}

		/// <summary>
		/// Product improvement = how to increase feature/differenciate our product?
		/// </summary>
		public int ProdRD {
			get;
			set;
		}

		/// <summary>
		/// Process engineering = how to reduce reject?
		/// </summary>
		public int ProcRD {
			get;
			set;
		}

		/// <summary>
		/// Did they buy the Report?
		/// </summary>
		private readonly List<int> _studies = new List<int>();

		/// <summary>
		/// Market research report
		/// </summary>
		public List<int> Studies {
			get {
				return _studies;
			}
		}


		//TODO: savePrice(LOW_REG To HIGH_REG, LOW_CUST To HIGH_CUST) As Integer      

		/// <summary>
		/// Reject rate
		/// </summary>
		public double RejectRate {
			get;
			set;
		}

		//
		//TODO: RTOrders(LOW_REG To HIGH_REG, LOW_CUST To HIGH_CUST) As Long 'Proforma Decision, therefore don't put this in nowTyp

		/// <summary>
		/// Experienced sales reps quit
		/// </summary>
		public int TotalQuit {
			get;
			set;
		}

		/// <summary>
		/// Competitor acquisition
		/// </summary>
		public int Acquire {
			get;
			set;
		}

		/// <summary>
		/// Acquiring debt
		/// </summary>
		public int AcquiredDebt {
			get;
			set;
		}
    }
}
